

<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<html>
<head>
  <meta charset="utf-8">
  <title>开放性实验辅助系统|登录</title>
  <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
  <link rel="stylesheet" href="http://localhost:8080/OpenExperimentManagementSystem/css/bootstrap.min.css">
  <link rel="stylesheet" href="http://localhost:8080/OpenExperimentManagementSystem/css/login_main.css">
  <link rel="stylesheet" href="http://localhost:8080/OpenExperimentManagementSystem/css/login.css">
  <style type="text/css">
    img{
      width: 100%;
      height: 100%;
    }
    .damu-carousel{
      height: 900px;
      overflow: hidden;
    }
  </style>
</head>
<body>
<!-- 1.头部 -->
<div id="header">
  <div class="logo">
    <a href="http://cs.njust.edu.cn/">
      <img src="http://localhost:8080/OpenExperimentManagementSystem/images/cslogo.png"  />
    </a>
  </div>
	<p style="padding-top: 33px;"><span style="font-size: 25px;font-weight: 800;">开放性实验辅助管理系统</span>
	<span style="float: right;color: gray;padding-right: 280px;padding-top: 20px;">欢迎登录！</span>
	</p>

</div>
<!-- 2.导航 -->
<div id="nav">
  <ul class="nav nav-pills">

    <li><a id="login">登录</a></li>
    <li><a href="#news">关于我们</a></li>

  </ul>
</div>

	
		<!-- 轮播图 -->
		<div id="carousel-example-generic" class="carousel slide damu-carousel" data-ride="carousel">
				  <!-- Indicators -->
				  <ol class="carousel-indicators">
				    <li data-target="#carousel-example-generic" data-slide-to="0" class="active"></li>
				    <li data-target="#carousel-example-generic" data-slide-to="1"></li>
					<li data-target="#carousel-example-generic" data-slide-to="2"></li>
				    <li data-target="#carousel-example-generic" data-slide-to="3"></li>
				  </ol>
				
				  <!-- Wrapper for slides -->
				  <div class="carousel-inner" role="listbox">
				    <div class="item active">
				      <a href="#news"><img src="http://localhost:8080/OpenExperimentManagementSystem/images/login_bg1.jpeg" ></a>
					  
				      <div class="carousel-caption">
				        <!-- 文字 -->
						
				      </div>
					  
					  
					  
				    </div>
				    <div class="item">
				      <a href="#news_re"><img src="http://localhost:8080/OpenExperimentManagementSystem/images/login_bg2.jpg" ></a>
				      <div class="carousel-caption">
				        
				      </div>
				    </div>
					
					
					<div class="item">
					  <a href="#news1"><img src="http://localhost:8080/OpenExperimentManagementSystem/images/login_bg3.jpg" ></a>
					  <div class="carousel-caption">
					    
					  </div>
					</div>
					
					<div class="item">
					  <a href="#news_re1"><img src="http://localhost:8080/OpenExperimentManagementSystem/images/login_bg4.jpg" ></a>
					  <div class="carousel-caption">
					    
					  </div>
					</div>
					
					
				    ...
				  </div>
				
				  <!-- Controls -->
				  <a class="left carousel-control" href="#carousel-example-generic" role="button" data-slide="prev">
				    <span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
				    <span class="sr-only">Previous</span>
				  </a>
				  <a class="right carousel-control" href="#carousel-example-generic" role="button" data-slide="next">
				    <span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
				    <span class="sr-only">Next</span>
				  </a>
				</div>










		<!-- 3.横幅 -->
		<div id="banner" style="background: url(http://localhost:8080/OpenExperimentManagementSystem/images/hpBG.jpg);background-attachment: fixed; background-size: 100% 100%">
		
			<!-- <img src="http://localhost:8080/OpenExperimentManagementSystem/images/about_1.jpg" /> -->
			
			<div class="font">
				<h1 >开放性实验辅助系统</h1>
				<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
				帮助您更加便捷灵活地选择您喜爱的实验</p>
			</div>
		</div>
			
		<!-- 4.介绍 -->
		<div id="news" style="background: url(http://localhost:8080/OpenExperimentManagementSystem/images/university1_bg.png);background-attachment: fixed; background-size: 100% 100%">
		    <div class="photo">
				<img src="http://localhost:8080/OpenExperimentManagementSystem/images/university1.jpg" >
			</div>
			<div class="newsFont">
				<h1 align="center" style="line-height: 60px;color: white;">网站简介</h1>
				<p style="line-height: 35px;color: white;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
				开放性实验辅助管理系统是面向南京理工大学师生的实验预约平台，同时还具有提交实验报告等一系列功能。平台为全体南京理工大学的师生搭建了全新、快捷、稳定的实验管理平台，允许学生预约实验以及提交实验报告，允许老师发布实验信息以及下载并评分学生的实验报告，允许管理员管理机房，留言信息以及各种实验信息。成功登陆之后用户即可进入自己所属的主页面，通过导航栏选择并使用本平台提供的各种功能。
				</p>
			</div>
		</div>
		<div id="news_re" style="background: url(http://localhost:8080/OpenExperimentManagementSystem/images/university3_bg.png);background-attachment: fixed; background-size: 100% 100%">
		    <div class="photo_re">
				<img src="http://localhost:8080/OpenExperimentManagementSystem/images/university3.jpg" >
			</div>
			<div class="newsFont_re">
				<h1 align="center" style="line-height: 60px;color: white;">开发者简介</h1>
				<p style="line-height: 35px;color: white;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
				冯俊嘉担任项目经理，负责安排项目总体开发。高逸凡担任质量保证人员负责保证产品的质量。陈功担任数据库开发人员，负责数据库设计已经开发。冯轶辰和项梓航担任软件测试员，负责软件测试以及修改意见。刘杰、贾歌晨、曾子昕和曹瑞龙担任代码开发人员，负责主要代码编写。丁恺和邱浩桐担任前端开发人员，负责交互界面设计以及开发。赵基宏和黄寿担任需求分析人员。负责编写需求分析。
				</p>
			</div>
		</div>
		<div id="news1" style="background: url(http://localhost:8080/OpenExperimentManagementSystem/images/university2_bg.png);background-attachment: fixed; background-size: 100% 100%">
		    <div class="photo">
				<img src="http://localhost:8080/OpenExperimentManagementSystem/images/university2.jpg" >
			</div>
			<div class="newsFont">
				<h1 align="center" style="line-height: 60px;color: white;">使用说明一</h1>
				<p style="line-height: 35px;color: white;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
				开放性实验辅助管理系统为用户提供方便快捷的服务。我们的平台给学生一个方便选择实验的方法，
				学生登录后可以选择实验，然后可以预约机房，在预约的时间和地点中去做实验，并且能够在该平台上
				下载老师的实验模板，并能够上传自己的实验报告，查看自己的实验分数。
				</p>
			</div>
		</div>
		<div id="news_re1" style="background: url(http://localhost:8080/OpenExperimentManagementSystem/images/university4_bg.png);background-attachment: fixed; background-size: 100% 100%">
		    <div class="photo_re">
				<img src="http://localhost:8080/OpenExperimentManagementSystem/images/university4.jpeg" >
			</div>
			<div class="newsFont_re">
				<h1 align="center" style="line-height: 60px;color: white;">使用说明二</h1>
				<p style="line-height: 35px;color: white;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
				老师可以在该平台上发布自己的实验，并且能够查看自己的实验情况，上传实验模板，能够下载学生的
				实验报告，且能够对其进行打分。机房管理员能够管理机房的相关信息，可以查看学生上传的实验报告，并且
				能够下载实验模板，实验管理员还能够收到学生的反馈信息。
				</p>
			</div>
		</div>
		
		
		
		
		<div id="hre"  >
			<h1 align="center" style="padding-top: 20px;color: black;" >查看更多</h1>
		    <h3  class="hre1h"style="color: black;margin-top: 6px;">使用说明一</h3>
			<div class="hre1">
				<a  href="#news1"><img src="http://localhost:8080/OpenExperimentManagementSystem/images/university2.jpg" /></a>
			</div>
			<h3 class="hre2h"style="color: black;margin-top: 6px;">使用说明二</h3>
			<div class="hre2">
				<a  href="#news_re1"><img src="http://localhost:8080/OpenExperimentManagementSystem/images/university4.jpeg" /></a>
			</div>
			<h3 class="hre3h" style="color: black;margin-top: 6px;">返回顶部</h3><br/>
			<div class="hre3">
				<a href="#header"><img src="http://localhost:8080/OpenExperimentManagementSystem/images/sunset.jpg" /></a>
			</div>
		</div>
		
		<!-- 5.尾部 -->
		<div id="footer">
		  <div  style="color: #999; text-align: center; height: 50px; line-height: 50px;">
		        Copyright &copy;2020 软件项目管理第5小组 All rights reserved.
		  </div>
		</div>








<div class="hide-center">
  <div id="formhead">
    <div id="formhead-title">
      &nbsp;&nbsp;&nbsp;&nbsp;
      登   &nbsp;录
    </div>
    <button type="button" id="close">X</button>
  </div>

<!-- <form action="servlet/LoginServlet" name="mylogin" onsubmit="return validateForm()" method="get" id="mylogin">
				<div><span>学号：</span><input type="text"  name="cid" id="login_num" maxlength="11"></div>
				<div><span>密码：</span><input type="text"  name="cpass" id="login_pwd"></div>
				<div><span>身份：</span><select  name="ctype" style="background:rgb(170,170,170) ">
					<option value="1">学生</option>
					<option value="2">教师</option>
					<option value="3">管理员</option>
				</select></div>
				<input type="submit" value="登录" class="login-btn">
			</form> -->

  <form name="mylogin" action="LoginServlet" onsubmit="return validateForm()" method="get" id="mylogin">
  <div id="formbody">
    <div class="loginUserName">
      <input id="input-topright-loginInput" name="cid" class="loginInput" placeholder="学 号"type="text" >
    </div>
    <div class="loginPassword">
      <input id="input-bottomright-loginInput" name="cpass" class="loginInput" placeholder="密 码" type="password" style="border-bottom-right-radius:5px;">
    </div>
	<div class="loginPassword">
	  <!-- <input id="input-bottomright-loginInput" name="password" class="loginInput" placeholder="密 码" type="password" style="border-bottom-right-radius:5px;"> -->
		<select name="ctype"class="loginInput" >
			<option value="1">学生</option>
			<option value="2">教师</option>
			<option value="3">管理员</option>
		</select>
	</div>
    <div id="formfoot">
      <!-- <button id="BSignIn" type="submit">Sign In</button> -->
	  <input id="BSignIn" type="submit" value="登&nbsp;&nbsp;录" />
    </div>
    <br/>
  </div>
  </form>


</div>

<!-- jQuery (Bootstrap 的所有 JavaScript 插件都依赖 jQuery，所以必须放在前边) -->
<script src="https://cdn.jsdelivr.net/npm/jquery@1.12.4/dist/jquery.min.js"></script>
<!-- 加载 Bootstrap 的所有 JavaScript 插件。你也可以根据需要只加载单个插件。 -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/js/bootstrap.min.js"></script>
<script>
  $("#login").click(function () {
    $(".hide-center").fadeIn("slow");
    $(".overCurtain").fadeIn("slow");
  })
  $("#close").click(function () {
    $(".hide-center").fadeOut("slow")
    $(".overCurtain").fadeOut("slow")
  })
</script>
<script>
  $('.carousel').carousel({
    interval: 500
  })
</script>
<script>
function validateForm(){
    var x=document.forms["mylogin"]["input-topright-loginInput"].value;
    var y=document.forms["mylogin"]["input-bottomright-loginInput"].value;
    if (x==null || x==""){
        alert("学号不能为空");
        return false;
    }
    var j = x.length;
    for (var i=0; i < j; i++)
    {  
        if (x[i] == " " || x[i] == "\\") {
	alert("学号不能包含空格和\\");
	return false;
        }
    }
    if (y==null || y==""){
      alert("密码不能为空");
      return false;
    }
    //密码加密
    var MD5 = function(d){result = M(V(Y(X(d),8*d.length)));return result.toLowerCase()};function M(d){for(var _,m="0123456789ABCDEF",f="",r=0;r<d.length;r++)_=d.charCodeAt(r),f+=m.charAt(_>>>4&15)+m.charAt(15&_);return f}function X(d){for(var _=Array(d.length>>2),m=0;m<_.length;m++)_[m]=0;for(m=0;m<8*d.length;m+=8)_[m>>5]|=(255&d.charCodeAt(m/8))<<m%32;return _}function V(d){for(var _="",m=0;m<32*d.length;m+=8)_+=String.fromCharCode(d[m>>5]>>>m%32&255);return _}function Y(d,_){d[_>>5]|=128<<_%32,d[14+(_+64>>>9<<4)]=_;for(var m=1732584193,f=-271733879,r=-1732584194,i=271733878,n=0;n<d.length;n+=16){var h=m,t=f,g=r,e=i;f=md5_ii(f=md5_ii(f=md5_ii(f=md5_ii(f=md5_hh(f=md5_hh(f=md5_hh(f=md5_hh(f=md5_gg(f=md5_gg(f=md5_gg(f=md5_gg(f=md5_ff(f=md5_ff(f=md5_ff(f=md5_ff(f,r=md5_ff(r,i=md5_ff(i,m=md5_ff(m,f,r,i,d[n+0],7,-680876936),f,r,d[n+1],12,-389564586),m,f,d[n+2],17,606105819),i,m,d[n+3],22,-1044525330),r=md5_ff(r,i=md5_ff(i,m=md5_ff(m,f,r,i,d[n+4],7,-176418897),f,r,d[n+5],12,1200080426),m,f,d[n+6],17,-1473231341),i,m,d[n+7],22,-45705983),r=md5_ff(r,i=md5_ff(i,m=md5_ff(m,f,r,i,d[n+8],7,1770035416),f,r,d[n+9],12,-1958414417),m,f,d[n+10],17,-42063),i,m,d[n+11],22,-1990404162),r=md5_ff(r,i=md5_ff(i,m=md5_ff(m,f,r,i,d[n+12],7,1804603682),f,r,d[n+13],12,-40341101),m,f,d[n+14],17,-1502002290),i,m,d[n+15],22,1236535329),r=md5_gg(r,i=md5_gg(i,m=md5_gg(m,f,r,i,d[n+1],5,-165796510),f,r,d[n+6],9,-1069501632),m,f,d[n+11],14,643717713),i,m,d[n+0],20,-373897302),r=md5_gg(r,i=md5_gg(i,m=md5_gg(m,f,r,i,d[n+5],5,-701558691),f,r,d[n+10],9,38016083),m,f,d[n+15],14,-660478335),i,m,d[n+4],20,-405537848),r=md5_gg(r,i=md5_gg(i,m=md5_gg(m,f,r,i,d[n+9],5,568446438),f,r,d[n+14],9,-1019803690),m,f,d[n+3],14,-187363961),i,m,d[n+8],20,1163531501),r=md5_gg(r,i=md5_gg(i,m=md5_gg(m,f,r,i,d[n+13],5,-1444681467),f,r,d[n+2],9,-51403784),m,f,d[n+7],14,1735328473),i,m,d[n+12],20,-1926607734),r=md5_hh(r,i=md5_hh(i,m=md5_hh(m,f,r,i,d[n+5],4,-378558),f,r,d[n+8],11,-2022574463),m,f,d[n+11],16,1839030562),i,m,d[n+14],23,-35309556),r=md5_hh(r,i=md5_hh(i,m=md5_hh(m,f,r,i,d[n+1],4,-1530992060),f,r,d[n+4],11,1272893353),m,f,d[n+7],16,-155497632),i,m,d[n+10],23,-1094730640),r=md5_hh(r,i=md5_hh(i,m=md5_hh(m,f,r,i,d[n+13],4,681279174),f,r,d[n+0],11,-358537222),m,f,d[n+3],16,-722521979),i,m,d[n+6],23,76029189),r=md5_hh(r,i=md5_hh(i,m=md5_hh(m,f,r,i,d[n+9],4,-640364487),f,r,d[n+12],11,-421815835),m,f,d[n+15],16,530742520),i,m,d[n+2],23,-995338651),r=md5_ii(r,i=md5_ii(i,m=md5_ii(m,f,r,i,d[n+0],6,-198630844),f,r,d[n+7],10,1126891415),m,f,d[n+14],15,-1416354905),i,m,d[n+5],21,-57434055),r=md5_ii(r,i=md5_ii(i,m=md5_ii(m,f,r,i,d[n+12],6,1700485571),f,r,d[n+3],10,-1894986606),m,f,d[n+10],15,-1051523),i,m,d[n+1],21,-2054922799),r=md5_ii(r,i=md5_ii(i,m=md5_ii(m,f,r,i,d[n+8],6,1873313359),f,r,d[n+15],10,-30611744),m,f,d[n+6],15,-1560198380),i,m,d[n+13],21,1309151649),r=md5_ii(r,i=md5_ii(i,m=md5_ii(m,f,r,i,d[n+4],6,-145523070),f,r,d[n+11],10,-1120210379),m,f,d[n+2],15,718787259),i,m,d[n+9],21,-343485551),m=safe_add(m,h),f=safe_add(f,t),r=safe_add(r,g),i=safe_add(i,e)}return Array(m,f,r,i)}function md5_cmn(d,_,m,f,r,i){return safe_add(bit_rol(safe_add(safe_add(_,d),safe_add(f,i)),r),m)}function md5_ff(d,_,m,f,r,i,n){return md5_cmn(_&m|~_&f,d,_,r,i,n)}function md5_gg(d,_,m,f,r,i,n){return md5_cmn(_&f|m&~f,d,_,r,i,n)}function md5_hh(d,_,m,f,r,i,n){return md5_cmn(_^m^f,d,_,r,i,n)}function md5_ii(d,_,m,f,r,i,n){return md5_cmn(m^(_|~f),d,_,r,i,n)}function safe_add(d,_){var m=(65535&d)+(65535&_);return(d>>16)+(_>>16)+(m>>16)<<16|65535&m}function bit_rol(d,_){return d<<_|d>>>32-_}
	
    var pwd= document.getElementById('login_pwd');
	
   pwd.value= MD5(pwd.value);
    
    return true;
}
</script>
</body>
</html>
